home *** CD-ROM | disk | FTP | other *** search
/ PCGUIA 114 / PC Guia 114.iso / Software / Produtividade / Apache 2.0.52 / apache_2.0.52-win32-x86-no_ssl.msi / Data.Cab / F278135_mod_userdir.html.en < prev    next >
Encoding:
Extensible Markup Language  |  2004-05-07  |  8.6 KB  |  171 lines

  1. <?xml version="1.0" encoding="ISO-8859-1"?>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><!--
  4.         XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  5.               This file is generated from xml source: DO NOT EDIT
  6.         XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  7.       -->
  8. <title>mod_userdir - Apache HTTP Server</title>
  9. <link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
  10. <link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
  11. <link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" />
  12. <link href="../images/favicon.ico" rel="shortcut icon" /></head>
  13. <body>
  14. <div id="page-header">
  15. <p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p>
  16. <p class="apache">Apache HTTP Server Version 2.0</p>
  17. <img alt="" src="../images/feather.gif" /></div>
  18. <div class="up"><a href="./"><img title="<-" alt="<-" src="../images/left.gif" /></a></div>
  19. <div id="path">
  20. <a href="http://www.apache.org/">Apache</a> > <a href="http://httpd.apache.org/">HTTP Server</a> > <a href="http://httpd.apache.org/docs-project/">Documentation</a> > <a href="../">Version 2.0</a> > <a href="./">Modules</a></div>
  21. <div id="page-content">
  22. <div id="preamble"><h1>Apache Module mod_userdir</h1>
  23. <div class="toplang">
  24. <p><span>Available Languages: </span><a href="../en/mod/mod_userdir.html" title="English"> en </a> |
  25. <a href="../ja/mod/mod_userdir.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a> |
  26. <a href="../ko/mod/mod_userdir.html" hreflang="ko" rel="alternate" title="Korean"> ko </a></p>
  27. </div>
  28. <table class="module"><tr><th><a href="module-dict.html#Description">Description:</a></th><td>User-specific directories</td></tr>
  29. <tr><th><a href="module-dict.html#Status">Status:</a></th><td>Base</td></tr>
  30. <tr><th><a href="module-dict.html#ModuleIdentifier">ModuleáIdentifier:</a></th><td>userdir_module</td></tr>
  31. <tr><th><a href="module-dict.html#SourceFile">SourceáFile:</a></th><td>mod_userdir.c</td></tr></table>
  32. <h3>Summary</h3>
  33.  
  34. <p>This module allows user-specific directories to be accessed using the
  35. <code>http://example.com/~user/</code> syntax.</p>
  36. </div>
  37. <div id="quickview"><h3 class="directives">Directives</h3>
  38. <ul id="toc">
  39. <li><img alt="" src="../images/down.gif" /> <a href="#userdir">UserDir</a></li>
  40. </ul>
  41. <h3>See also</h3>
  42. <ul class="seealso">
  43. <li><a href="../urlmapping.html">Mapping URLs to the
  44. Filesystem</a></li>
  45. <li><a href="../howto/public_html.html">public_html
  46. tutorial</a></li>
  47. </ul></div>
  48.  
  49. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  50. <div class="directive-section"><h2><a name="UserDir" id="UserDir">UserDir</a> <a name="userdir" id="userdir">Directive</a></h2>
  51. <table class="directive">
  52. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Location of the user-specific directories</td></tr>
  53. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>UserDir <em>directory-filename</em></code></td></tr>
  54. <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>UserDir public_html</code></td></tr>
  55. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
  56. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
  57. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_userdir</td></tr>
  58. </table>
  59.  
  60.     <p>The <code class="directive">UserDir</code> directive sets the real
  61.     directory in a user's home directory to use when a request for a
  62.     document for a user is received. <em>Directory-filename</em> is
  63.     one of the following:</p>
  64.  
  65.     <ul>
  66.       <li>The name of a directory or a pattern such as those shown
  67.       below.</li>
  68.  
  69.       <li>The keyword <code>disabled</code>. This turns off
  70.       <em>all</em> username-to-directory translations except those
  71.       explicitly named with the <code>enabled</code> keyword (see
  72.       below).</li>
  73.  
  74.       <li>The keyword <code>disabled</code> followed by a
  75.       space-delimited list of usernames. Usernames that appear in
  76.       such a list will <em>never</em> have directory translation
  77.       performed, even if they appear in an <code>enabled</code>
  78.       clause.</li>
  79.  
  80.       <li>The keyword <code>enabled</code> followed by a
  81.       space-delimited list of usernames. These usernames will have
  82.       directory translation performed even if a global disable is
  83.       in effect, but not if they also appear in a
  84.       <code>disabled</code> clause.</li>
  85.     </ul>
  86.  
  87.     <p>If neither the <code>enabled</code> nor the
  88.     <code>disabled</code> keywords appear in the
  89.     <code>Userdir</code> directive, the argument is treated as a
  90.     filename pattern, and is used to turn the name into a directory
  91.     specification. A request for
  92.     <code>http://www.foo.com/~bob/one/two.html</code> will be
  93.     translated to:</p>
  94.  
  95. <table>
  96. <tr><th>UserDir directive used</th>
  97. <th>Translated path</th></tr>
  98. <tr><td>UserDir public_html</td><td>~bob/public_html/one/two.html</td></tr>
  99. <tr><td>UserDir /usr/web</td><td>/usr/web/bob/one/two.html</td></tr>
  100. <tr><td>UserDir /home/*/www</td><td>/home/bob/www/one/two.html</td></tr>
  101. </table>
  102.  
  103.     <p>The following directives will send redirects to the client:</p> 
  104.  
  105. <table>
  106. <tr><th>UserDir directive used</th>
  107. <th>Translated path</th></tr>
  108. <tr><td>UserDir http://www.foo.com/users</td><td>http://www.foo.com/users/bob/one/two.html</td></tr>
  109. <tr><td>UserDir
  110. http://www.foo.com/*/usr</td><td>http://www.foo.com/bob/usr/one/two.html</td></tr>
  111. <tr><td>UserDir
  112. http://www.foo.com/~*/</td><td>http://www.foo.com/~bob/one/two.html</td></tr>
  113. </table> 
  114.  
  115. <div class="note">
  116.       <strong>Be careful when using this directive; for instance,
  117.       <code>"UserDir ./"</code> would map <code>"/~root"</code> to
  118.       <code>"/"</code> - which is probably undesirable. It is strongly
  119.       recommended that your configuration include a "<code>UserDir
  120.       disabled root</code>" declaration.  See also the <code class="directive"><a href="../mod/core.html#directory">Directory</a></code> directive and the <a href="../misc/security_tips.html">Security Tips</a> page for
  121.       more information.</strong>
  122. </div>
  123.  
  124. <p>Additional examples:</p>
  125.  
  126. <p>To allow a few users to have <code>UserDir</code> directories, but
  127. not anyone else, use the following:</p>
  128.  
  129. <div class="example"><p><code>
  130. UserDir disabled<br />
  131. UserDir enabled user1 user2 user3
  132. </code></p></div>
  133.  
  134. <p>To allow most users to have <code>UserDir</code> directories, but
  135. deny this to a few, use the following:</p>
  136.  
  137. <div class="example"><p><code>
  138. UserDir enabled<br />
  139. UserDir disabled user4 user5 user6
  140. </code></p></div>
  141.  
  142. <p>It is also possible to specify alternative user directories.
  143. If you use a command like:</p>
  144. <div class="example"><p><code>
  145. Userdir public_html /usr/web http://www.foo.com/
  146. </code></p></div>
  147. <p>With a request for http://www.foo.com/~bob/one/two.html, will try to 
  148. find the page at ~bob/public_html/one/two.html first, then
  149. /usr/web/bob/one/two.html, and finally it will send a redirect
  150. to http://www.foo.com/bob/one/two.html.</p>
  151. <p>If you add a redirect, it must be the last alternative in the list.
  152. Apache cannot determine if the redirect succeeded or not, so if you have
  153. the redirect earlier in the list, that will always be the alternative
  154. that is used.</p>
  155.  
  156.  
  157. <h3>See also</h3>
  158. <ul>
  159. <li><a href="../howto/public_html.html">public_html
  160. tutorial</a></li>
  161. </ul>
  162. </div>
  163. </div>
  164. <div class="bottomlang">
  165. <p><span>Available Languages: </span><a href="../en/mod/mod_userdir.html" title="English"> en </a> |
  166. <a href="../ja/mod/mod_userdir.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a> |
  167. <a href="../ko/mod/mod_userdir.html" hreflang="ko" rel="alternate" title="Korean"> ko </a></p>
  168. </div><div id="footer">
  169. <p class="apache">Copyright 1999-2004 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
  170. <p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p></div>
  171. </body></html>